package com.qf.job;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.SchedulerException;

import java.util.Date;

/**
 * 定时器调试框架的执行任务内容
 * @author lixu
 */
public class HelloJob implements Job {

    /**
     * 任务内容
     * @param jobExecutionContext
     * @throws JobExecutionException
     */
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {

        System.out.println("==我是执行任务的内容:时间：" + new Date());

        try {
            System.out.println(jobExecutionContext.getScheduler().getSchedulerName());


        } catch (SchedulerException e) {
            e.printStackTrace();
        }

    }
}
